package com.microlecture.service.impl;

import com.microlecture.entity.ShopCart;
import com.microlecture.mapper.ShopCartMapper;
import com.microlecture.service.ShopCartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopCartServiceImpl implements ShopCartService {

    @Autowired
    private ShopCartMapper shopCartMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return shopCartMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(ShopCart record) {
        return shopCartMapper.insertSelective(record);
    }

    @Override
    public ShopCart selectByPrimaryKey(Integer id) {
        return shopCartMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(ShopCart record) {
        return shopCartMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<ShopCart> selectByCondition(Integer userid, Integer cookbookid) {
        return shopCartMapper.selectByCondition(userid, cookbookid);
    }
}